﻿using System.Collections.Generic;
using DAO;
using DTO;

namespace BUS
{
    public class NguoiDungBUS
    {
        public static List<NguoiDungDTO> getAll()
        {
            return NguoiDungDAO.getAll();
        }

        public static NguoiDungDTO getAlongCode(int maNguoiDung)
        {
            return NguoiDungDAO.getAlongCode(maNguoiDung);
        }

        public static NguoiDungDTO layNguoiDungTheoTen(string strUsername)
        {
            return NguoiDungDAO.layNguoiDungTheoTen(strUsername);
        }

        public static NguoiDungDTO layNguoiDungTheoEmail(string strEmail)
        {
            return NguoiDungDAO.layNguoiDungTheoEmail(strEmail);
        }

        public static bool kiemTraEmailTrung(string strEmail)
        {
            return NguoiDungDAO.kiemTraEmailTrung(strEmail);
        }

        public static bool kiemTraTenTrung(string strTen)
        {
            return NguoiDungDAO.kiemTraTenTrung(strTen);
        }

        public static bool Insert(NguoiDungDTO _insert)
        {
            return NguoiDungDAO.Insert(_insert);
        }
        public static bool InsertTemplate(NguoiDungDTO _insert)
        {
            return NguoiDungDAO.InsertTemplate(_insert);
        }
        public static void Delete(int maNguoiDung)
        {
            NguoiDungDAO.Delete(maNguoiDung);
        }

        public static bool Update(NguoiDungDTO dto)
        {
            return NguoiDungDAO.Update(dto);
        }

        public static NguoiDungDTO getNguoiDungTheoMa(int maNguoiDung)
        {
            return NguoiDungDAO.getNguoiDungTheoMa(maNguoiDung);
        }
    }
}
